/* 字母异位词的最小步骤 */
    /* 字母组成相同但是顺序不同  eat ate */
#include <iostream>

int Hash(char c)
{
    return c - 'a';
}

int main()
{
    std::string s1 = "zhangsan";
    std::string s2 = "wangwuge";
    //默认长度相同
    int hash1[26] = {0};
    int hash2[26] = {0};

    for(int i = 0; i < s1.size();i++)
    {
        hash1[Hash(s1[i])]++;   //重点查看
        hash2[Hash(s2[i])]++;
    }
    int count = 0;
    for(int i = 0; i < 26; i++)
    {
        //多或少只需要变一个
        if(hash1[i] < hash2[i])
        {
            count += hash2[i] - hash1[i];
        }
    }
    std::cout<<count<<std::endl;

    return 0;
}